import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useLoginStore = defineStore('login', () => {
    const loginVisible = ref(false)
    const registerVisible = ref(false)

    function showLogin() {
        loginVisible.value = true
        registerVisible.value = false
    }

    function hideLogin() {
        loginVisible.value = false
    }

    function showRegister() {
        registerVisible.value = true
        loginVisible.value = false
    }

    function hideRegister() {
        registerVisible.value = false
    }

    return {
        loginVisible,
        registerVisible,
        showLogin,
        hideLogin,
        showRegister,
        hideRegister
    }
}) 